package org.jeecg.modules.basedata.service;


import org.jeecg.entity.basedata.BaseCustomer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.entity.basedata.BaseRoom;
import org.jeecg.modules.system.model.SysDepartTreeModel;
import org.jeecg.vo.basedata.BaseCustomerPage;

import java.util.List;

/**
 * @Description: 业主
 * @Author: jeecg-boot
 * @Date:   2019-07-18
 * @Version: V1.0
 */
public interface IBaseCustomerService extends IService<BaseCustomer> {

    Page<BaseCustomerPage> listHistory(Page<BaseCustomerPage> page, BaseCustomer baseCustomer);

    BaseCustomer queryByRoomId(String roomId);

    Integer listCustomerId(String roomId);

    BaseCustomer detailById(String id,String methodId);

    /**
     *  模糊查询分页
     * @param page
     * @param map
     * @return
     */
    Page<BaseCustomerPage> listByParams(Page<BaseCustomerPage> page, BaseCustomerPage baseCustomer);


    /************************************租户*****************************************/
    public Page<BaseCustomer> getBaseTenantList(Page<BaseCustomer> page, Wrapper<BaseCustomer> wrapper);

    public List<SysDepartTreeModel> queryTenantTreeList(String menuPath);

    public List<SysDepartTreeModel> querFloorTreList();

    public String  getByTenantId(String roomId);

    public BaseCustomer getTenantByRoomId(String roomId);

    public String  getByCustomerId(String roomId);

    int getCountByRoomIdAndCustomerName(String roomId, String customerName);

    int getCountByRoomId(String roomId);

    void addBatchCustomer(List<BaseCustomer> baseCustomers, List<BaseRoom> baseRoomList);

    Integer getCustomerCount(String roomId);

    List<BaseCustomer> getCustomer(BaseCustomer baseCustomer);
}
